package com.gryffonx.utils;


import javax.swing.filechooser.FileFilter;
import java.io.File;

/**
 * **************************************************************************
 * Application:
 * Author: Erik Stell
 * Date: Sep 13, 2004
 * Time: 3:36:38 PM
 * Process:
 * **************************************************************************
 */
public class XMLFileFilter extends FileFilter {

    //Accept all directories and all gif, jpg, tiff, or png files.
    public boolean accept(File f) {
        if (f.isDirectory()) {
            return true;
        }
        String extension = Utils.getExtension(f);

        if (extension != null) {
            return extension.equals(Utils.xml);
        }
        return false;
    } //The description of this filter

    public String getDescription() {
        return "XML Files";
    }
}
